
package com.netease.xone.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.widget.FrameLayout;

import com.netease.xone.R;
import com.netease.xone.fragment.FragmentAdviceList;

public class ActivityAdviceList extends ActivityX1Base {

    private final String TAG = ActivityAdviceList.class.getSimpleName();

    public static void startActivity(Context context) {
        Intent i = new Intent(context, ActivityAdviceList.class);
        context.startActivity(i);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitle(R.string.msgbubble_advice);
        FrameLayout linear = new FrameLayout(this);
        linear.setId(R.id.activity_advice_list_container_id);
        setContentView(linear);

        if (findViewById(R.id.activity_advice_list_container_id) != null
                && savedInstanceState == null) {
            Fragment f = FragmentAdviceList.newInstance();
            FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
            ft.replace(R.id.activity_advice_list_container_id, f);
            ft.commit();
        }
    }

}
